package com.lifa.service.impl;


import com.lifa.dao.SPquchushijianDao;
import com.lifa.entity.SPquchushijian;
import com.lifa.service.SPquchushijianService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SPquchushijianServiceImpl implements SPquchushijianService {
    @Autowired
    private SPquchushijianDao sPquchushijianDao;

    public List<SPquchushijian> list() {
        return sPquchushijianDao.query();
    }
    /**
     * 分页
     * @param name
     * @param offset
     * @param limit
     * @return
     */
    @Override
    public List<SPquchushijian> findAll(String name, int offset, int limit) {
        return sPquchushijianDao.queryPage(name,offset,limit);
    }

    /**
     * 总条数
     * @param name
     * @return
     */
    @Override
    public int findTotalCount(String name) {
        return sPquchushijianDao.getTotalCount(name);
    }
}
